3.1.4 \(\int (a+b x) \sin (c+d x) \, dx\) [4]

Optimal. Leaf size=28 \[ -\frac {(a+b x) \cos (c+d x)}{d}+\frac {b \sin (c+d x)}{d^2} \]

[Out]

-(b*x+a)*cos(d*x+c)/d+b*sin(d*x+c)/d^2

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 28, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {3377, 2717} \begin {gather*} \frac {b \sin (c+d x)}{d^2}-\frac {(a+b x) \cos (c+d x)}{d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + b*x)*Sin[c + d*x],x]

[Out]

-(((a + b*x)*Cos[c + d*x])/d) + (b*Sin[c + d*x])/d^2

Rule 2717

Int[sin[Pi/2 + (c_.) + (d_.)*(x_)], x_Symbol] :> Simp[Sin[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rule 3377

Int[((c_.) + (d_.)*(x_))^(m_.)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> Simp[(-(c + d*x)^m)*(Cos[e + f*x]/f), x]
+ Dist[d*(m/f), Int[(c + d*x)^(m - 1)*Cos[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]

Rubi steps

\begin {align*} \int (a+b x) \sin (c+d x) \, dx &=-\frac {(a+b x) \cos (c+d x)}{d}+\frac {b \int \cos (c+d x) \, dx}{d}\\ &=-\frac {(a+b x) \cos (c+d x)}{d}+\frac {b \sin (c+d x)}{d^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.06, size = 27, normalized size = 0.96 \begin {gather*} \frac {-d (a+b x) \cos (c+d x)+b \sin (c+d x)}{d^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + b*x)*Sin[c + d*x],x]

[Out]

(-(d*(a + b*x)*Cos[c + d*x]) + b*Sin[c + d*x])/d^2

________________________________________________________________________________________

Maple [A]
time = 0.03, size = 52, normalized size = 1.86

method result size
risch \(-\frac {\left (b x +a \right ) \cos \left (d x +c \right )}{d}+\frac {b \sin \left (d x +c \right )}{d^{2}}\) \(29\)
derivativedivides \(\frac {-a \cos \left (d x +c \right )+\frac {b c \cos \left (d x +c \right )}{d}+\frac {b \left (\sin \left (d x +c \right )-\left (d x +c \right ) \cos \left (d x +c \right )\right )}{d}}{d}\) \(52\)
default \(\frac {-a \cos \left (d x +c \right )+\frac {b c \cos \left (d x +c \right )}{d}+\frac {b \left (\sin \left (d x +c \right )-\left (d x +c \right ) \cos \left (d x +c \right )\right )}{d}}{d}\) \(52\)
norman \(\frac {\frac {2 a \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {b x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {2 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d^{2}}-\frac {b x}{d}}{1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}\) \(74\)
meijerg \(\frac {2 b \sqrt {\pi }\, \sin \left (c \right ) \left (-\frac {1}{2 \sqrt {\pi }}+\frac {\cos \left (d x \right )}{2 \sqrt {\pi }}+\frac {d x \sin \left (d x \right )}{2 \sqrt {\pi }}\right )}{d^{2}}+\frac {2 b \sqrt {\pi }\, \cos \left (c \right ) \left (-\frac {d x \cos \left (d x \right )}{2 \sqrt {\pi }}+\frac {\sin \left (d x \right )}{2 \sqrt {\pi }}\right )}{d^{2}}+\frac {a \sin \left (c \right ) \sin \left (d x \right )}{d}+\frac {a \sqrt {\pi }\, \cos \left (c \right ) \left (\frac {1}{\sqrt {\pi }}-\frac {\cos \left (d x \right )}{\sqrt {\pi }}\right )}{d}\) \(105\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*x+a)*sin(d*x+c),x,method=_RETURNVERBOSE)

[Out]

1/d*(-a*cos(d*x+c)+1/d*b*c*cos(d*x+c)+1/d*b*(sin(d*x+c)-(d*x+c)*cos(d*x+c)))

________________________________________________________________________________________

Maxima [A]
time = 0.29, size = 53, normalized size = 1.89 \begin {gather*} -\frac {a \cos \left (d x + c\right ) - \frac {b c \cos \left (d x + c\right )}{d} + \frac {{\left ({\left (d x + c\right )} \cos \left (d x + c\right ) - \sin \left (d x + c\right )\right )} b}{d}}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)*sin(d*x+c),x, algorithm="maxima")

[Out]

-(a*cos(d*x + c) - b*c*cos(d*x + c)/d + ((d*x + c)*cos(d*x + c) - sin(d*x + c))*b/d)/d

________________________________________________________________________________________

Fricas [A]
time = 0.36, size = 30, normalized size = 1.07 \begin {gather*} -\frac {{\left (b d x + a d\right )} \cos \left (d x + c\right ) - b \sin \left (d x + c\right )}{d^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)*sin(d*x+c),x, algorithm="fricas")

[Out]

-((b*d*x + a*d)*cos(d*x + c) - b*sin(d*x + c))/d^2

________________________________________________________________________________________

Sympy [A]
time = 0.08, size = 46, normalized size = 1.64 \begin {gather*} \begin {cases} - \frac {a \cos {\left (c + d x \right )}}{d} - \frac {b x \cos {\left (c + d x \right )}}{d} + \frac {b \sin {\left (c + d x \right )}}{d^{2}} & \text {for}\: d \neq 0 \\\left (a x + \frac {b x^{2}}{2}\right ) \sin {\left (c \right )} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)*sin(d*x+c),x)

[Out]

Piecewise((-a*cos(c + d*x)/d - b*x*cos(c + d*x)/d + b*sin(c + d*x)/d**2, Ne(d, 0)), ((a*x + b*x**2/2)*sin(c),
True))

________________________________________________________________________________________

Giac [A]
time = 4.51, size = 31, normalized size = 1.11 \begin {gather*} -\frac {{\left (b d x + a d\right )} \cos \left (d x + c\right )}{d^{2}} + \frac {b \sin \left (d x + c\right )}{d^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)*sin(d*x+c),x, algorithm="giac")

[Out]

-(b*d*x + a*d)*cos(d*x + c)/d^2 + b*sin(d*x + c)/d^2

________________________________________________________________________________________

Mupad [B]
time = 4.49, size = 35, normalized size = 1.25 \begin {gather*} \frac {b\,\sin \left (c+d\,x\right )}{d^2}-\frac {a\,\cos \left (c+d\,x\right )+b\,x\,\cos \left (c+d\,x\right )}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(c + d*x)*(a + b*x),x)

[Out]

(b*sin(c + d*x))/d^2 - (a*cos(c + d*x) + b*x*cos(c + d*x))/d

________________________________________________________________________________________